<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>symbol</title>
	</head>
	<body>
		<script>
			let s = Symbol('www');
			console.log(s,typeof s);
			let s2 = Symbol('aaa');
			let s3 = Symbol('aaa');
			console.log(s2 == s3);
			let s4 = Symbol.for('x');
			let s5 = Symbol.for('x');
			console.log(s4 == s5);
			// let result = s > '100';
			
			class Person {
				static [Symbol.hasInstance](param) {
					console.log(param);
					console.log('我被用来检测类型了!');
					return false;
				}
			}
			
			let o = {};
			console.log(o instanceof Person);
			const arr = [1,2,3];
			const arr2 = [4,5,6];
			arr2[Symbol.isConcatSpreadable] = false;
			console.log(arr.concat(arr2));
		</script>
	</body>
</html>